<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LogDevice API: /Users/chunma/fbsource/fbcode/logdevice/include/ConfigSubscriptionHandle.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LogDevice API
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_3c764b8ed47d00d6b5627c49bc32f70b.html">fbsource</a></li><li class="navelem"><a class="el" href="dir_7d108206b339ff559c2aaa41b8fb2672.html">fbcode</a></li><li class="navelem"><a class="el" href="dir_903050bd1b8bae4e85fca6c90c654c58.html">logdevice</a></li><li class="navelem"><a class="el" href="dir_46acbb48b960dc60b3c5450db912a0e4.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">ConfigSubscriptionHandle.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;functional&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;list&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;mutex&gt;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacefacebook.html">facebook</a> { <span class="keyword">namespace </span>logdevice {</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">namespace </span>configuration {</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">class </span>UpdateableConfigBase;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">enum class</span> SubscriptionStatus;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">using</span> subscription_id_t = uint64_t;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;}</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">   32</a></span>&#160;<span class="keyword">class </span><a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a> final {</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#a14b7d0e00c3e41c226cbc4974f476977">ConfigSubscriptionHandle</a>() noexcept = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  <a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#a14b7d0e00c3e41c226cbc4974f476977">ConfigSubscriptionHandle</a>(configuration::UpdateableConfigBase* owner,</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;                           configuration::subscription_id_t sub_id) noexcept;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  <a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#ac1973ec9cd0a992d20cd11022c6ff907">~ConfigSubscriptionHandle</a>() noexcept;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#a14b7d0e00c3e41c226cbc4974f476977">ConfigSubscriptionHandle</a>(<a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a>&amp;&amp; other) noexcept;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  <a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a>&amp; <a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#a90f35b31afc668e2ee0a359ce9dd87b2">operator=</a>(</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;      <a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a>&amp;&amp; other) noexcept;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#a284e3162835932f6f808be9d219465ea">unsubscribe</a>() noexcept;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#aa24da62aabbff915c6c4c21bb049339c">   75</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#aa24da62aabbff915c6c4c21bb049339c">swap</a>(<a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a>&amp; other) noexcept {</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keyword">using</span> std::swap;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#aa24da62aabbff915c6c4c21bb049339c">swap</a>(owner_, other.owner_);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#aa24da62aabbff915c6c4c21bb049339c">swap</a>(sub_id_, other.sub_id_);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  }</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  std::weak_ptr&lt;configuration::UpdateableConfigBase&gt; owner_;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  configuration::subscription_id_t sub_id_;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;};</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;}}</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacestd.html">std</a> {</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> swap(</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">facebook::logdevice::ConfigSubscriptionHandle</a>&amp; left,</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <a class="code" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">facebook::logdevice::ConfigSubscriptionHandle</a>&amp; right) noexcept {</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  left.swap(right);</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;}</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;}</div><div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdef"><b>Definition:</b> ConfigSubscriptionHandle.h:88</div></div>
<div class="ttc" id="namespacefacebook_html"><div class="ttname"><a href="namespacefacebook.html">facebook</a></div><div class="ttdef"><b>Definition:</b> AsyncReader.h:17</div></div>
<div class="ttc" id="classfacebook_1_1logdevice_1_1_config_subscription_handle_html_a14b7d0e00c3e41c226cbc4974f476977"><div class="ttname"><a href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#a14b7d0e00c3e41c226cbc4974f476977">facebook::logdevice::ConfigSubscriptionHandle::ConfigSubscriptionHandle</a></div><div class="ttdeci">ConfigSubscriptionHandle() noexcept=default</div></div>
<div class="ttc" id="classfacebook_1_1logdevice_1_1_config_subscription_handle_html_aa24da62aabbff915c6c4c21bb049339c"><div class="ttname"><a href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#aa24da62aabbff915c6c4c21bb049339c">facebook::logdevice::ConfigSubscriptionHandle::swap</a></div><div class="ttdeci">void swap(ConfigSubscriptionHandle &amp;other) noexcept</div><div class="ttdef"><b>Definition:</b> ConfigSubscriptionHandle.h:75</div></div>
<div class="ttc" id="classfacebook_1_1logdevice_1_1_config_subscription_handle_html_ac1973ec9cd0a992d20cd11022c6ff907"><div class="ttname"><a href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#ac1973ec9cd0a992d20cd11022c6ff907">facebook::logdevice::ConfigSubscriptionHandle::~ConfigSubscriptionHandle</a></div><div class="ttdeci">~ConfigSubscriptionHandle() noexcept</div></div>
<div class="ttc" id="classfacebook_1_1logdevice_1_1_config_subscription_handle_html_a90f35b31afc668e2ee0a359ce9dd87b2"><div class="ttname"><a href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#a90f35b31afc668e2ee0a359ce9dd87b2">facebook::logdevice::ConfigSubscriptionHandle::operator=</a></div><div class="ttdeci">ConfigSubscriptionHandle &amp; operator=(ConfigSubscriptionHandle &amp;&amp;other) noexcept</div></div>
<div class="ttc" id="classfacebook_1_1logdevice_1_1_config_subscription_handle_html_a284e3162835932f6f808be9d219465ea"><div class="ttname"><a href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#a284e3162835932f6f808be9d219465ea">facebook::logdevice::ConfigSubscriptionHandle::unsubscribe</a></div><div class="ttdeci">void unsubscribe() noexcept</div></div>
<div class="ttc" id="classfacebook_1_1logdevice_1_1_config_subscription_handle_html"><div class="ttname"><a href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">facebook::logdevice::ConfigSubscriptionHandle</a></div><div class="ttdef"><b>Definition:</b> ConfigSubscriptionHandle.h:32</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<hr class="footer"/><address class="footer">
<small>
LogDevic API v2.35
</small>
</address>
</body>
</html>
